package com.face.server.entity;

import lombok.Data;
import org.springframework.data.mongodb.core.index.Indexed;

import javax.validation.constraints.Size;

/**
 * 拥有账号密码
 */
@Data
public class Auth {

    //头像
    private String proPhoto;

//    @Indexed(unique = true, sparse = true)
    @Size(min = 6, max = 16, message = "用户名在6~16位之间")
    private String username;

    @Size(min = 6, max = 16, message = "密码在6~16位之间")
    private String password;

}
